package com.itheima.user.dto;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Data
public class LoginDTO {
    @NotEmpty(message = "用户名不能为空")
    private String username;
    @Pattern(regexp = "^[a-zA-Z0-9]{6,20}$", message = "密码格式不正确")
    @NotEmpty(message = "密码不能为空")
    private String password;
}
